import type { RouteRecordRaw } from 'vue-router'
/**
 * 所有路由集中管理
 */
const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'home',
    component: () => import('@/pages/index.vue'),
    meta: {
      title: 'Beranda',
      i18n: 'home',
      hideNavBar: true
    }
  },
  {
    path: '/newsdetail',
    name: 'newsdetail',
    component: () => import('@/pages/newsdetail/index.vue'),
    meta: {
      title: 'Berita',
      i18n: 'newsdetail',
      hideNavBar: false
    }
  },
  {
    path: '/products',
    name: 'products',
    component: () => import('@/pages/products/index.vue'),
    meta: {
      title: 'Produk',
      i18n: 'products',
      hideNavBar: true
    }
  },
  {
    path: '/contract',
    name: 'contract',
    component: () => import('@/pages/contract/index.vue'),
    meta: {
      title: 'Rincian Kontrak',
      i18n: 'contract',
      hideTabBar: true
    }
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('@/pages/about/index.vue'),
    meta: {
      title: 'Tentang',
      i18n: 'about',
      hideNavBar: false
    }
  },
  {
    path: '/profile',
    name: 'profile',
    component: () => import('@/pages/profile/index.vue'),
    meta: {
      title: 'Profil',
      i18n: 'profile',
      hideNavBar: true
    }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/pages/login/index.vue'),
    meta: {
      title: 'login',
      i18n: 'login',
      hideNavBar: true,
      layout: 'blank'
    }
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('@/pages/login/register.vue'),
    meta: {
      title: 'register',
      i18n: 'register',
      hideNavBar: true,
      layout: 'blank'
    }
  },
  {
    path: '/forgot-password',
    name: 'forgot-password',
    component: () => import('@/pages/login/forgotword.vue'),
    meta: {
      title: 'forgot-password',
      i18n: 'forgot-password',
      hideNavBar: true,
      layout: 'blank' 
    }
  },
  // 用户中心路由
  {
    path: '/user/profile',
    name: 'user-profile',
    component: () => import('@/pages/user/profile.vue'),
    meta: {
      title: 'Profil',
      i18n: 'use-profile',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/password',
    name: 'user-password',
    component: () => import('@/pages/user/password.vue'),
    meta: {
      title: 'Sunting kata sandi',
      i18n: 'user-password',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/bank',
    name: 'user-bank',
    component: () => import('@/pages/user/bank.vue'),
    meta: {
      title: 'Manajemen Kartu Bank',
      i18n: 'user-bank',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/recharge',
    name: 'user-recharge',
    component: () => import('@/pages/user/recharge.vue'),
    meta: {
      title: 'Deposit',
      i18n: 'user-recharge',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/withdrawal',
    name: 'user-withdrawal',
    component: () => import('@/pages/user/withdrawal.vue'),
    meta: {
      title: 'Penarikan',
      i18n: 'user-withdrawal',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/balancerecord',
    name: 'user-balancerecord',
    component: () => import('@/pages/user/balancerecord.vue'),
    meta: {
      title: 'Catatan dompet',
      i18n: 'user-balancerecord',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/invite',
    name: 'user-invite',
    component: () => import('@/pages/user/invite.vue'),
    meta: {
      title: 'Undang Teman',
      i18n: 'user-invite',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/team',
    name: 'user-team',
    component: () => import('@/pages/user/team.vue'),
    meta: {
      title: 'Tim Saya',
      i18n: 'user-team',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/coupon',
    name: 'user-coupon',
    component: () => import('@/pages/user/coupon.vue'),
    meta: {
      title: 'Kupon',
      i18n: 'user-coupon',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/mall',
    name: 'user-mall',
    component: () => import('@/pages/user/mall.vue'),
    meta: {
      title: 'Toko Poin',
      i18n: 'user-mall',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/faq',
    name: 'user-faq',
    component: () => import('@/pages/user/faq.vue'),
    meta: {
      title: 'FAQ',
      i18n: 'user-faq',
      hideNavBar: false
    }
  },
  {
    path: '/user/rule',
    name: 'user-rule',
    component: () => import('@/pages/user/rule.vue'),
    meta: {
      title: 'Peraturan Platform',
      i18n: 'user-rule',
      hideNavBar: false
    }
  },
  {
    path: '/user/online',
    name: 'user-online',
    component: () => import('@/pages/user/online.vue'),
    meta: {
      title: 'Layanan Online',
      i18n: 'user-online',
      hideNavBar: false
    }
  },
  {
    path: '/user/vip-detail',
    name: 'user-vip-detail',
    component: () => import('@/pages/user/vipdetail.vue'),
    meta: {
      title: 'Detail VIP',
      i18n: 'user-vip-detail',
      hideNavBar: true,
      requiresAuth: true
    }
  },
  {
    path: '/user/gift',
    name: 'user-gift',
    component: () => import('@/pages/user/gift.vue'),
    meta: {
      title: 'Pusat Hadiah',
      i18n: 'user-gift',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/gpu',
    name: 'user-gpu',
    component: () => import('@/pages/user/gpu.vue'),
    meta: {
      title: 'Produk Saya',
      i18n: 'user-gpu',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/checkin',
    name: 'user-checkin',
    component: () => import('@/pages/user/checkin.vue'),
    meta: {
      title: 'Check-in Harian',
      i18n: 'user-checkin',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/messagelist',
    name: 'user-messagelist',
    component: () => import('@/pages/user/messagelist.vue'),
    meta: {
      title: 'Pusat Pesan',
      i18n: 'user-messagelist',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/user/messagedetail',
    name: 'user-messagedetail',
    component: () => import('@/pages/user/messagedetail.vue'),
    meta: {
      title: 'Detail Pesan',
      i18n: 'user-messagedetail',
      hideNavBar: false,
      requiresAuth: true
    }
  },
  {
    path: '/privacy',
    name: 'privacy',
    component: () => import('@/pages/privacy/index.vue'),
    meta: {
      title: 'Privacy Policy',
      i18n: 'privacy',
      hideNavBar: false
    }
  },
  {
    path: '/gpuinfo',
    name: 'gpuinfo',
    component: () => import('@/pages/gpuinfo/index.vue'),
    meta: {
      title: 'ADC MCP3008',
      hideTabBar: true
    }
  },
  {
    path: '/static/settle',
    name: 'static-settle',
    component: () => import('@/pages/static/settle/index.vue'),
    meta: {
      title: 'Pembayaran Pesanan',
      i18n: 'static-settle',
      hideTabBar: true
    }
  },
  {
    path: '/static/usdt',
    name: 'static-usdt',
    component: () => import('@/pages/static/usdt/index.vue'),
    meta: {
      title: 'Isi ulang sebesar USDT',
      i18n: 'static-usdt',
      hideTabBar: true
    }
  },
  {
    path: '/console/withdrawalrecord',
    name: 'console-withdrawalrecord',
    component: () => import('@/pages/console/withdrawalrecord.vue'),
    meta: {
      title: 'Catatan penarikan',
      i18n: 'console-withdrawalrecord',
      hideTabBar: true
    }
  },
  {
    path: '/console/profitrecord',
    name: 'console-profitrecord',
    component: () => import('@/pages/console/profitrecord.vue'),
    meta: {
      title: 'Catatan Pendapatan',
      i18n: 'console-profitrecord',
      hideTabBar: true
    }
  },
  {
    path: '/console/svipopen',
    name: 'console-svipopen',
    component: () => import('@/pages/console/svipopen.vue'),
    meta: {
      title: 'VIP',
      i18n: 'console-svipopen',
      hideTabBar: true
    }
  },
  // 添加其他路由...
  {
    path: '/:pathMatch(.*)*',
    name: 'not-found',
    component: () => import('@/pages/[...all].vue')
  }
]

export default routes 